  /**
   * Generate time : 2012-10-15 3:17:48
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zp.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZPUserset 
 *  
 */
public class ZPUserset extends DaoEPBase {

	private String postTypeLabel = " ";		
	private String postTypeName = " ";		
	private String postLabel = " ";		
	private String orgLabel = " ";	
	private String descInfo = " ";		
	private Long sortIndex = new Long(0);	
	private String attribute = " ";		
	private String property = " ";		
	private String ext1 = " ";		
	private String ext2 = " ";		
	private String ext3 = " ";		
	private String usersetType = " ";		

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("postTypeLabel");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("postTypeName");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("postLabel");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("orgLabel");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("descInfo");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("sortIndex");
	eiColumn.setType("N");
	eiColumn.setScaleLength(0);
	eiColumn.setFieldLength(38);
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("attribute");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("property");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("ext1");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("ext2");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("ext3");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("usersetType");
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	

	}
	/**
	 * the constructor
	 */
	public ZPUserset() {
		initMetaData();
	}
	
	/**
	 * get the name 
	 * @return the name
	 */
	public String getPostTypeLabel() {
		return this.postTypeLabel;
	}
	
	/**
	 * set the name 
	 */
	public void setPostTypeLabel(String postTypeLabel) {
		this.postTypeLabel = postTypeLabel;
	}
	
	
	/**
	 * get the displayName 
	 * @return the displayName
	 */
	public String getPostTypeName() {
		return this.postTypeName;
	}
	
	/**
	 * set the displayName 
	 */
	public void setPostTypeName(String postTypeName) {
		this.postTypeName = postTypeName;
	}
	
	/**
	 * get the postLabel 
	 * @return the postLabel
	 */
	public String getPostLabel() {
		return this.postLabel;
	}
	
	/**
	 * set the postLabel 
	 */
	public void setPostLabel(String postLabel) {
		this.postLabel = postLabel;
	}
	
	/**
	 * get the orgLabel 
	 * @return the orgLabel
	 */
	public String getOrgLabel() {
		return this.orgLabel;
	}
	
	/**
	 * set the orgLabel 
	 */
	public void setOrgLabel(String orgLabel) {
		this.orgLabel = orgLabel;
	}
	
	/**
	 * get the descInfo 
	 * @return the descInfo
	 */
	public String getDescInfo() {
		return this.descInfo;
	}
	
	/**
	 * set the descInfo 
	 */
	public void setDescInfo(String descInfo) {
		this.descInfo = descInfo;
	}
	
	/**
	 * get the sortIndex 
	 * @return the sortIndex
	 */
	public Long getSortIndex() {
		return this.sortIndex;
	}
	
	/**
	 * set the sortIndex 
	 */
	public void setSortIndex(Long sortIndex) {
		this.sortIndex = sortIndex;
	}
	
	/**
	 * get the attribute 
	 * @return the attribute
	 */
	public String getAttribute() {
		return this.attribute;
	}
	
	/**
	 * set the attribute 
	 */
	public void setAttribute(String attribute) {
		this.attribute = attribute;
	}
	
	/**
	 * get the property 
	 * @return the property
	 */
	public String getProperty() {
		return this.property;
	}
	
	/**
	 * set the property 
	 */
	public void setProperty(String property) {
		this.property = property;
	}
	
	/**
	 * get the ext1 
	 * @return the ext1
	 */
	public String getExt1() {
		return this.ext1;
	}
	
	/**
	 * set the ext1 
	 */
	public void setExt1(String ext1) {
		this.ext1 = ext1;
	}
	
	/**
	 * get the ext2 
	 * @return the ext2
	 */
	public String getExt2() {
		return this.ext2;
	}
	
	/**
	 * set the ext2 
	 */
	public void setExt2(String ext2) {
		this.ext2 = ext2;
	}
	
	/**
	 * get the ext3 
	 * @return the ext3
	 */
	public String getExt3() {
		return this.ext3;
	}
	
	/**
	 * set the ext3 
	 */
	public void setExt3(String ext3) {
		this.ext3 = ext3;
	}
	
	/**
	 * get the usersetType 
	 * @return the usersetType
	 */
	public String getUsersetType() {
		return this.usersetType;
	}
	
	/**
	 * set the usersetType 
	 */
	public void setUsersetType(String usersetType) {
		this.usersetType = usersetType;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setPostTypeLabel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("postTypeLabel")), postTypeLabel));
		setPostTypeName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("postTypeName")), postTypeName));
		setPostLabel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("postLabel")), postLabel));
		setOrgLabel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("orgLabel")), orgLabel));
		setDescInfo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("descInfo")), descInfo));
		setSortIndex(NumberUtils.toLong(StringUtils.toString(map.get("sortIndex")), sortIndex));
		setAttribute(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("attribute")), attribute));
		setProperty(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("property")), property));
		setExt1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("ext1")), ext1));
		setExt2(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("ext2")), ext2));
		setExt3(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("ext3")), ext3));
		setUsersetType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("usersetType")), usersetType));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("postTypeLabel",StringUtils.toString(postTypeLabel, eiMetadata.getMeta("postTypeLabel")));	
			map.put("postTypeName",StringUtils.toString(postTypeName, eiMetadata.getMeta("postTypeName")));	
			map.put("postLabel",StringUtils.toString(postLabel, eiMetadata.getMeta("postLabel")));
			map.put("orgLabel",StringUtils.toString(orgLabel, eiMetadata.getMeta("orgLabel")));
			map.put("descInfo",StringUtils.toString(descInfo, eiMetadata.getMeta("descInfo")));	
			map.put("sortIndex",StringUtils.toString(sortIndex, eiMetadata.getMeta("sortIndex")));	
			map.put("attribute",StringUtils.toString(attribute, eiMetadata.getMeta("attribute")));	
			map.put("property",StringUtils.toString(property, eiMetadata.getMeta("property")));	
			map.put("ext1",StringUtils.toString(ext1, eiMetadata.getMeta("ext1")));	
			map.put("ext2",StringUtils.toString(ext2, eiMetadata.getMeta("ext2")));	
			map.put("ext3",StringUtils.toString(ext3, eiMetadata.getMeta("ext3")));	
			map.put("usersetType",StringUtils.toString(usersetType, eiMetadata.getMeta("usersetType")));	
			
		return map;
	
	}
}